package io.ent.modules.sys.controller;

import java.util.Arrays;
import java.util.Map;

import io.ent.common.utils.PageUtils;
import io.ent.common.utils.R;
import io.ent.common.validator.ValidatorUtils;
import io.ent.modules.sys.entity.SysLoginLogEntity;
import io.ent.modules.sys.service.SysLoginLogService;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;



/**
 * 系统日志
 *
 * 
 * 
 * 
 */
@RestController
@RequestMapping("sys/sysloginlog")
public class SysLoginLogController {
    @Autowired
    private SysLoginLogService sysLoginLogService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    @RequiresPermissions("sys:sysloginlog:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = sysLoginLogService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 删除
     */
    @RequestMapping("/delete")
    @RequiresPermissions("sys:sysloginlog:delete")
    public R delete(@RequestBody Long[] ids){
        sysLoginLogService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
